<template>
	<view class="counsdom">
		<view class="ListOfPatientsBT_item" v-for="(item,index) in list" :key='index' style="margin-bottom: 10px;"
			@tap="reportFun(item)">
			<u-form labelAlign="right">
				<u-form-item prop="name">
					<u-form-item prop="name" style='width: 32px; height: 20px;'>
						<u-input :value="item.children[0].groupflag" :disabled="true"></u-input>
					</u-form-item>
					<text class="ListOfPatientsBTItem_textT">{{item.children[0].frequency}}</text>
					<view class="ListOfPatientsBTItem_text" v-if="item.children[0].ordertype">
						{{item.children[0].ordertype.replace(/(^\s*)|(\s*$)/g,"") == 'S'?'临':item.children[0].ordertype.replace(/(^\s*)|(\s*$)/g,"") == 'R' ? '长':item.children[0].ordertype.replace(/(^\s*)|(\s*$)/g,"") == 'C'?'出':item.children[0].ordertype.replace(/(^\s*)|(\s*$)/g,"")}}
					</view>
					<view class="ListOfPatientsBTItem_textT">
						{{item.children[0].admission}}
					</view>
					<view class="ListOfPatientsBTItem_Right">
						{{item.children[0].datestop}}
					</view>
					<image class="Iage" src="../../assets/image/sjd.png"></image>
				</u-form-item>
			</u-form>
			<view class="ListOfPatientsBT_center">
				<view class="center-title" v-if="item.children[0].petypeTiele">
					{{item.children[0].petypeTiele}}
				</view>
				<view :style="{marginLeft:item.children[0].petypeTiele ?'40px':''}">
					<view v-for="(el,ind) in item.children" :key="ind">
						{{el.remark + ' ' + el.many +'.0' + el.packunit+ ' ' + (el.dosage.trim()  ? '【'+el.dosage+'】' : el.dosage)}}
					</view>
				</view>
			</view>
		</view>
	</view>

</template>

<script>
	export default {
		props: {
			list: {
				type: Array
			}
		},
		methods: {
			reportFun(data){
				this.$emit('reportFun',data)
			}
		}
	}
</script>

<style lang="scss">
	// .ListOfPatients_BT {
	// 	// width: 100%;
	// 	// height: 100%;
	// 	display: flex;
	// 	flex-wrap: wrap;
	// 	justify-content: center;
	// 	// padding-top: 10px;
	// 	padding: 10px 10px;
	// 	// margin-top: 166px;
	// 	padding-bottom: 0px;
	.counsdom {
		width: 96%;
		margin: 0 auto;
	}

	.ListOfPatientsBT_item {
		width: 100%;
		min-height: 50px;
		background: #B0E9EC;
		border-radius: 6px;
		padding-bottom: 17px;
		position: relative;


		.ListOfPatientsBTItem_text {
			font-size: 16px;
			font-family: SourceHanSansCN-Medium, SourceHanSansCN;
			font-weight: 500;
			color: #FF4D65;
			line-height: 24px;
		}

		.ListOfPatientsBTItem_textT {
			font-size: 16px;
			font-family: SourceHanSansCN-Medium, SourceHanSansCN;
			font-weight: 500;
			color: #333333;
			line-height: 24px;
		}

		.ListOfPatientsBTItem_Right {
			width: 164px;
			height: 30px;
			// background: #FFFFCF ;
			// border-bottom-left-radius: 404rpx;
			// background-image: url("../../assets/image/sjd.png");
			// background-size: 104% 115%;
			// background-repeat: no-repeat;
			text-align: right;
			line-height: 30px;
			z-index: 1;
		}

		.Iage {
			width: 54% !important;
			height: 42% !important;
			position: absolute;
			top: 0;
			right: 0;
			background-size: auto !important;
			background-position: 100% 0% !important;
		}
	}

	.ListOfPatientsBT_itemTwo {
		width: 100%;
		min-height: 50px;
		background: #B0E9EC;
		border-radius: 6px;
		position: relative;
		// display: flex;
		// justify-content: space-between;

		.ListOfPatientsBT_itemTwo_left {
			// width: 190px;
			// min-height: 50px;
			line-height: 50px;
			display: flex;
			padding: 0 10px;

			// justify-content: space-around;
			&:nth-child(1) {
				padding: 20px 10px 0;
			}
		}

		.ListOfPatientsBT_itemTwo_right {
			.ListOfPatientsBT_itemTwo_rightSJ {
				position: absolute;
				top: 4px;
				right: 0;
				width: 161px;
				height: 30px;
				z-index: 1;
			}

			.ZXImg {
				position: absolute;
				top: 0;
				right: 0;
				width: 182px !important;
				height: 40px !important;
			}
		}
	}

	.ListOfPatientsBT_center {
		background: #F6FEFF;
		border-radius: 6px;
		opacity: 0.95;
		margin: -9px 6px;
		padding: 10px;
		word-break: break-all;
		// display: flex;

		.center-title {
			position: absolute;
			width: 26px;
			height: 24px;
			font-size: 14px;
			font-family: SourceHanSansCN-Medium, SourceHanSansCN;
			font-weight: 500;
			color: #FFFFFF;
			line-height: 21px;
			background: #FF6E91;
			border-radius: 60%;
			text-align: center;
			margin-right: 5px;
		}
	}

	// }
</style>
